home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mtgrap1c / bitmap.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-06  |  1.9 KB  |  108 lines

  1. /*****************************************************
  2. ; Filename     :  bitmap.h
  3. ;
  4. ; Date         :  11-7-94
  5. ; Mod. Date    :  29-7-94
  6. ;
  7. ; Others    
  8. ;****************************************************/
  9. #ifndef BITMAP_H
  10. #define BITMAP_H
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. #include "std_defs.h"
  17.  
  18. typedef struct wgtsprite
  19. {
  20.     int    slot;
  21.     int    width;
  22.     int    height;
  23.     byte    *data;
  24.  
  25. } WGTSPRITE;
  26.  
  27. typedef struct wgtspritefile
  28. {
  29.     int    version;
  30.     byte    id[13];            //" Sprite File "
  31.     byte    palette[768];
  32.     int    total;
  33.     
  34. } WGTSPRITE_HEADER;
  35.  
  36. typedef struct sprite
  37. {
  38. //    int    index;
  39.     int    width;
  40.     int    height;
  41.     byte    *data;
  42.  
  43. } SPRITE;
  44.  
  45. typedef struct spriteheader
  46. {
  47.     int        reserved;
  48.     byte        type[8];
  49.     byte        palette[768];
  50.     int        total;
  51. } SPRITE_HEADER;
  52.  
  53.  
  54.  
  55. typedef struct CELHeader {
  56.     int    magic_number;
  57.     int    width;
  58.     int     height;
  59.     int    x_coord;
  60.     int    y_coord;
  61.     int    compress_type;
  62.     long    image_size;
  63.     int    reserved[8];
  64.     byte    palette[768];
  65.     byte    *image;
  66. } CELHDR;
  67.  
  68. /*
  69. typedef struct devichdr {
  70.  
  71.     byte    char[26];
  72.     byte    endcode;
  73.     byte    mode;
  74.     byte    total;
  75.     DIM    *array;
  76.     
  77. } DEVICHDR
  78. */
  79.  
  80. // found in image.cpp
  81. extern         WGTSPRITE_HEADER   *wgt_header;
  82. extern         SPRITE_HEADER       *sprite_header;
  83. int         mtLoadPCX(char *filename);
  84.  
  85. WGTSPRITE      **mtLoadWGT(char *filename,byte palette[]);
  86. int         mtSaveWGT(char *fontname,WGTSPRITE **sprite);
  87. void        mtFreeWGT(WGTSPRITE **sprite);
  88.  
  89. SPRITE     **mtLoadBlit(char *filename, byte palette[]); 
  90. int     mtSaveBlit(char *filename,SPRITE **sprite);
  91.  
  92. void    mtFreeBlit(SPRITE **sprite);
  93.  
  94.  
  95. //found in bitmap.asm
  96. void    mtCPutBlit(int x, int y, int width, int height, byte *buf);
  97. void    mtCPutSprite(int x, int y, int width, int height, byte *buf);
  98.  
  99. void    mtPutBlit(int x, int y, int width, int height, byte *buf);
  100. void    mtPutSprite(int x, int y, int width, int height, byte *buf);
  101. void    mtCPutFont(int x, int y, int w, int h, byte *buf);
  102.  
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106.  
  107. #endif BITMAP_H
  108.